package com.likai.jarscms.service.impl;

import com.likai.jarscms.dao.IManagerMapper;
import com.likai.jarscms.pojo.Manager;
import com.likai.jarscms.service.IManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by likai on 2018/10/14.
 */
@Service("managerService")
public class ManagerServiceImpl implements IManagerService {

    @Autowired
    private IManagerMapper managerMapper ;

    @Transactional(readOnly = true)
    public Manager login(Manager bean) {
        return managerMapper.selectByUsaAndPws(bean);
    }

    @Transactional(readOnly = true)
    public Manager findByUserName(String username) {
        return managerMapper.selectByUserName(username);
    }
}
